package com.singzi.leetcode.jianzhiOffer;

public class T0053 {
}
class Solution0053 {
    public int missingNumber(int[] nums) {
        int left = 0, right = nums.length-1;
        int mid = 0;
        while (left < right){
            mid = (right - left)/2;
            if(nums[mid]==mid){
                left = mid;
            }
            else {
                right = mid;
            }
        }
        return mid;

    }
}